<?php
namespace app\common\model;
use think\Cache;

class Travel extends Common
{
	public function activity()
    {
        return $this->belongsToMany('Activity','\app\common\model\TravelActivity');
    }

    public function oversea()
    {
        return $this->belongsToMany('Oversea','\app\common\model\TravelActivity','activity_id');
    }

	public static function getScene($step,$type)
	{
		$scene = '';
		switch ($step) {
			case '1':
			    $scene = $type=='1'?'travel.overseabase':"travel.base";
				break;
			case '2':
				$scene = "travel.choose";
				break;
			case '3':
				$scene = "travel.addsite";
				break;
			default:
				$scene = "travel.generate";
				break;
		}

		return $scene;
	}

	public static function getTeamnum($scale)
	{
		$teamnum = '';
		switch ($scale) {
			case '1':
				$teamnum = "1";
				break;
			case '2':
				$teamnum = "50";
				break;
			case '3':
				$teamnum = "100";
				break;
			case '4':
				$teamnum = "300";
				break;
			case '5':
				$teamnum = "500";
				break;
			default:
				$teamnum = "1000";
				break;
		}

		return $teamnum;
	}

	public static function getLimitnum($scale)
	{
		$teamnum = '';
		switch ($scale) {
			case '1':
				$teamnum = "50";
				break;
			case '2':
				$teamnum = "100";
				break;
			case '3':
				$teamnum = "300";
				break;
			case '4':
				$teamnum = "500";
				break;
			case '5':
				$teamnum = "1000";
				break;
			default:
				$teamnum = "不限";
				break;
		}

		return $teamnum;
	}

}